package com.xuelang.pipeline.infrastructure.pipeline.converter;

import com.xuelang.pipeline.domain.pipeline.Group;
import com.xuelang.pipeline.infrastructure.pipeline.dataobject.GroupDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 流水线分组实体与流水线分组DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface GroupToGroupDOConverter {

    GroupToGroupDOConverter INSTANCE = Mappers.getMapper(GroupToGroupDOConverter.class);

    /**
     * Group转化为GroupDO
     * @param group
     * @return
     */
    GroupDO groupToGroupDO(Group group);

    /**
     * GroupDO转化为Group
     * @param groupDO
     * @return
     */
    Group groupDOToGroup(GroupDO groupDO);

}
